class Singleton(object):
    __instance = None

    def __new__(cls, *args, **kwargs):
        if cls.__instance == None:
            cls.__instance == object.__new__(cls)
            return cls.__instance
        else:
            return cls.__instance


a = Singleton()
b = Singleton()
print(id(a) == id(b))
